home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’87 / Source ƒ.sit / Source ƒ / C ƒ / TRANS-LSC / MiniSkel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-10-04  |  872 b   |  37 lines  |  [TEXT/KAHL]

  1. /*
  2.     TransSkel demonstration:  Minimal application
  3.  
  4.     This program does nothing but put up an Apple menu with desk
  5.     accessories, and a File menu with a Quit item.  The user can
  6.     run DA's until Quit is selected or command-Q is typed.
  7.  
  8.     The project should include this file, TransSkel.c (or a project
  9.     built from TransSkel.c), and MacTraps.
  10.  
  11.     27 June 1986        Paul DuBois
  12. */
  13.  
  14. # include    <MenuMgr.h>
  15. # define    nil    0L
  16.  
  17.  
  18. DoFileMenu (item)
  19. int        item;                        /* ignored - there's only Quit */
  20. {
  21.     SkelWhoa ();                    /* tell SkelMain to quit */
  22. }
  23.  
  24.  
  25. main ()
  26. {
  27. MenuHandle    m;
  28.  
  29.     SkelInit ();                    /* initialize */
  30.     SkelApple (nil, nil);            /* handle desk accessories */
  31.     m = NewMenu (2, "\pFile");        /* create menu */
  32.     AppendMenu (m, "\pQuit/Q");
  33.     SkelMenu (m, DoFileMenu, nil);    /* tell TransSkel to handle it */
  34.     SkelMain ();                    /* loop 'til Quit selected */
  35.     SkelClobber ();                    /* clean up */
  36. }
  37.